<template>

	<div>
		<el-select v-model="value">
			
		 <el-option
		      v-for="item in options"
		      :key="item.value"
		      :label="item.label"
		      :value="item.value">
		    </el-option>
			
			
		</el-select>
		
		
		<el-button @click="changeStats()">修改 stats中 的值 </el-button>
		
		
	</div>
	
	
</template>

<script>
	export default{
		name:'Vuex',
		data(){
			return {
				options: [{
				      value: '黄金糕1',
				      label: '黄金糕'
				    }, {
				      value: '双皮奶2',
				      label: '双皮奶'
				    }, {
				      value: '蚵仔煎3',
				      label: '蚵仔煎'
				    }, {
				      value: '龙须面4',
				      label: '龙须面'
				    }, {
				      value: '北京烤鸭5',
				      label: '北京烤鸭'
				    }],
				    value: ''
			}
		},
		methods:{
			changeStats(){
				this.$store.commit("increment");
			}
		},
		watch:{
			value(v1,v2){
				console.log(v1+"---"+v2)
			},
			//vuex
		}
	}
	
	
</script>

<style scoped>
	
	
	
	
</style>